<include file="public@header" />
</head>
<body>
    <div class="layui-fluid">
        <form action="{:url('User/editPost')}" method="post" class="layui-form js-ajax-form margin-top-20">
            <div class="layui-card">
                <div class="layui-card-header">{:lang('ADMIN_USER_EDIT')}</div>
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="form-required">*</span>{:lang('USERNAME')}</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="input-user_login" name="user_login" value="{$user_login}">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="form-required">*</span>{:lang('PASSWORD')}</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="input-user_pass" name="user_pass" value="" placeholder="******">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="form-required">*</span>{:lang('EMAIL')}</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="input-user_email" name="user_email" value="{$user_email}">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span class="form-required">*</span>{:lang('ROLE')}</label>
                        <div class="layui-input-block">
                            <foreach name="roles" item="vo">
                                <php>$role_id_checked=in_array($vo['id'],$role_ids)?"checked":"";</php>
                                <input value="{$vo.id}" type="checkbox" name="role_id[]" title="{$vo.name}" lay-skin="primary" {$role_id_checked}>
                            </foreach>
                        </div>
                    </div>
                    
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$id}" />
                            <button type="submit" class="layui-btn layui-btn-normal js-ajax-submit">{:lang('SAVE')}</button>
                            <a class="layui-btn layui-btn-primary" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
<include file="public@footer" />
